package com.aizuda.boot.modules.business.contractNumber.domain.resquest;

import com.aizuda.boot.modules.common.constant.enums.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;
import java.util.UUID;

/**
 * @Author sangyirong
 * @ClassName ContractNumberRuleSaveDTO
 * @Version 1.0
 * @Date 2025/7/2 17:39
 */
@Data
@Schema(description = "合同编号规则保存")
public class ContractNumberRuleSaveDTO {

    @Schema(description = "规则ID,添加时为非必填")
    private Long id;

    @Schema(description = "规则名称")
    private String ruleName;

    @Schema(description = "规则编码")
    private String ruleCode = UUID.randomUUID().toString().replace("-", "").substring(0, 8);

    @Schema(description = "规则类型")
    private RuleTypeEnums ruleType;

    @Schema(description = "生成时机")
    private GenerateTimingEnums generateTiming;

    @Schema(description = "自动序号位数")
    private Integer autoIncrementDigits;

    @Schema(description = "编号模式：所有合同共用一套编号或基于我方主体生成编号")
    private NumberModeEnums numberMode;

    @Schema(description = "序号重置时长：不重置、每月重置、每年重置")
    private SequenceResetEnums sequenceReset;

    @Schema(description = "我方主体添加模式：只有第一个地方添加或所有地方都添加")
    private SubjectAddModeEnums subjectAddMode;

    @Schema(description = "编码条件")
    private CodingConditionEnums codingCondition;

    @Schema(description = "是否启用")
    private Boolean isEnabled = true;

    @Schema(description = "规则组件")
    private List<Component> components;
}
